package com.lee.alibaba;

import org.junit.Before;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class Test1 {

    class Test2 extends Test1 {

    }

    @Before
    public void setUp() throws Exception {

    }

    @Test
    public void test(){
        List<? extends Test1 > list = new ArrayList();
//        list.add(new Test2());
        list.get(0);
    }

    @Test
    public void test2(){
        List<? super Test2> list = new ArrayList<>();
//        list.add(new Test1());
        list.get(0);
    }
}
